<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8"/>

</head>
<style>
    .appguide-wrap {
        display: block;
        margin: 15px 10px;
        border-radius: 5px;
        box-shadow: 0 0 6px #ddd;
        overflow: hidden;
        background: #f09629;
        background-image: repeating-linear-gradient(60deg, rgba(255, 255, 255, .1), rgba(255, 255, 255, .1) 15px, transparent 0, transparent 30px);
    }

    .appguide-wrap .appguide-txt {
        padding: 15px 10px;
        font-size: 16px;
        line-height: 26px;
        color: #fff;
    }

    .appguide-wrap .appguide-btns {
        display: flex;
        line-height: 40px;
        text-align: center;
        background: #fff;
    }

    .appguide-wrap .appguide-btns span {
        flex: 1;
    }

    .appguide-wrap .appguide-btns span:first-child {
        background: #f5f5f5;
        color: #999;
    }
</style>

<body id="reader-m-fix">
<link rel="stylesheet" href="https://cdn.bootcss.com/sweetalert/0.5.0/sweet-alert.css"/>
<link rel="stylesheet" href="css/hhh.css"/>
<script src="https://cdn.bootcss.com/jquery/2.1.4/jquery.min.js"></script>
<script src="/static/js/novel.js"></script>
<script src="https://zqjscss.cdn.bcebos.com/js/apps.js"></script>
<script src="https://unpkg.com/axios@0.19.2/dist/axios.min.js"></script><!--axios-->
<script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script><!--vue插件-->
<div id="novelContent">
    <div class="header_wap pc_none">
        <span class="title">笔趣阁</span>
        <a class="user" href="##">
            <svg class="lnr lnr-user">
                <use xlink:href="#lnr-user"></use>
            </svg>
        </a>
    </div>
    <div class="header_top"></div>
    <div class="header">
        <div class="wrap">
            <h1 class="logo"><a href="/">笔趣阁</a></h1>
            <div class="search">
                <form action="/" id="form">
                    <input class="text" id="keyWord" name="q" v-model="novelName" type="text"
                           placeholder="可搜书名和作者，请您少字也别输错字。"/>
                    <input type="submit" class="btn" @click="queryNovel" value="搜索"/>
                </form>
            </div>
        </div>
        <div class="nav">
            <ul class="nav">
                <li><a href="/index.html">首页</a></li>
                <li><a href="#" @click="chapterNameType('玄幻小说')">玄幻小说</a></li>
                <li><a href="#" @click="chapterNameType('修真小说')">修真小说</a></li>
                <li><a href="#" @click="chapterNameType('都市小说')">都市小说</a></li>
                <li><a href="#" @click="chapterNameType('穿越小说')">穿越小说</a></li>
                <li><a href="#" @click="chapterNameType('网游小说')">网游小说</a></li>
                <li><a href="#" @click="chapterNameType('科幻小说')">科幻小说</a></li>
                <li><a href="#" @click="chapterNameType('其他小说')">其他小说</a></li>
                <li><a href="/setSearch.html">添加小说</a></li>
            </ul>
        </div>
    </div>
    <div class="header_wap pc_none">
        <a class="home" href="javascript:history.go(-1);">
            <svg class="lnr lnr-chevron-left-circle">
                <use xlink:href="#lnr-chevron-left-circle"></use>
            </svg></a>
        <span class="title">{{chapterName.chapterName}}</span>
        <a class="user" href="/">
            <svg class="lnr lnr-home">
                <use xlink:href="#lnr-home"></use>
            </svg></a>
    </div>
    <div class="book reader">
        <div class="path wap_none">
            <a href="/">笔趣阁</a> &gt;
            <a href="#"></a> &gt; {{chapterName.chapterName}}
        </div>
        <div class="Readbtn">
            字体：
            <a id="fontbig" class="sizebg" onclick="nr_setbg('big')">大</a>
            <a id="fontmiddle" class="sizebg" onclick="nr_setbg('middle')">中</a>
            <a id="fontsmall" class="sizebg" onclick="nr_setbg('small')">小</a>&nbsp;&nbsp;&nbsp;&nbsp;
            <a id="huyandiv" class="button huyanon" onclick="nr_setbg('huyan')">护眼</a>
            <a id="lightdiv" class="button lightoff" onclick="nr_setbg('light')">关灯</a>
        </div>
        <div class="content">
            <h1 >{{chapterName.chapterName}}</h1>
            <div class="Readpage pc_none">
                <a :href="'/novelContent.html?chapterNameId='+content.upPage">上一章</a>
                <span class="xs-hidden">← </span>
                <a :href="'/chapterName.html?novelId='+chapterName.novelId">章节列表</a>
                <span class="xs-hidden">→</span>
                <a :href="'/novelContent.html?chapterNameId='+content.nextPage">下一页</a>
            </div>
            <div id="chaptercontent" class="Readarea ReadAjax_content" v-html="content.content">
                　{{content.content}}
                <p class="readinline"><a class="ll" rel="nofollow" title="章节错误,点此举报[免注册]" href="javascript:chapter_error('6030','1','亿万首席宠妻成瘾莫宛溪贺煜城','第1章睡了一个鸭子','1632405440');">『点此报错』</a><a class="rr" rel="nofollow" title="加入书签，方便阅读" href="javascript:addBookMark('16947','1','亿万首席宠妻成瘾莫宛溪贺煜城','第1章睡了一个鸭子');">『加入书签』</a></p>
            </div>
            <script type="text/javascript" src="https://apps.bdimg.com/libs/jquery/1.8.3/jquery.min.js"></script>
            <script type="text/javascript" src="/js/common.js"></script>
            <script type="text/javascript" src="/js/read.js"></script>
            <script>read2();</script>
            <div class="Readpage pagedown">
                <a :href="'/novelContent.html?chapterNameId='+content.upPage">上一章</a>
                <span class="xs-hidden">← </span>
                <a :href="'/chapterName.html?novelId='+chapterName.novelId">章节列表</a>
                <span class="xs-hidden">→</span>
                <a :href="'/novelContent.html?chapterNameId='+content.nextPage">下一页</a>
            </div>

        </div>
    </div>
<script src="https://zqjscss.cdn.bcebos.com/js/iconfont.js"></script>
<script src="https://apps.bdimg.com/libs/jquery/1.4.2/jquery.min.js"></script>
<script src="https://cdn.bootcss.com/sweetalert/0.5.0/sweet-alert.min.js"></script>
<div class="xs-hidden">
    <script type="text/javascript" src="https://zqjscss.cdn.bcebos.com/js/pc-novel.js"></script>
</div>
</div>
<script>

    new Vue({
        el: '#novelContent',
        data: {
            chapterName: [],
            content: []
        },
        methods: {
            chapterNameType: function (e) {
                window.location.href = "/chapterNameType.html?type=" + e;
            },
            queryNovel: function () {
                window.location.href = "/searchNovelByName.html?novelName=" + this.novelName

            }
        },
        created: function () {
            var that = this;
            let novelContenId = decodeURI(window.location.href.split('?')[1].split('=')[1]);
            let token = window.sessionStorage.getItem('token');
            axios.get("/novelContent/novelContent/" + novelContenId, {headers: {'Authorization': token}}).then(function (res) {
                if (res.data.code) {
                    that.chapterName = res.data.extend.success[0]
                    that.content = that.chapterName.novelContent
                } else {
                    alert("请您先登录");
                    window.location.href = "/login.html"
                }
            })
        }
    })
</script>
</body>

</html>
